package com.zhongxiangspace.enums;

/**
 * 价格范围
 */
public enum  PriceExtenEnum {

    PRICE_EXTEN_0_50("p1",0,50),
    PRICE_EXTEN_50_80("p2",50,80),
    PRICE_EXTEN_80_100("p3",80,100),
    PRICE_EXTEN_100_150("p4",100,150),
    PRICE_EXTEN_150_200("p5",150,200),
    PRICE_EXTEN_200_999999("p6",200,999999);
    private  String name;
    private Integer min;
    private  Integer max;

    PriceExtenEnum(String name, Integer min, Integer max) {
        this.name = name;
        this.min = min;
        this.max = max;
    }
    public static PriceExtenEnum getEnumObject(String name) {
        for (PriceExtenEnum r : PriceExtenEnum.values()) {
            if (r.getName().equals(name)) {
                return r;
            }
        }
        return PriceExtenEnum.PRICE_EXTEN_200_999999;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getMin() {
        return min;
    }

    public void setMin(Integer min) {
        this.min = min;
    }

    public Integer getMax() {
        return max;
    }

    public void setMax(Integer max) {
        this.max = max;
    }
}
